<template>
    <div  class="news" ref="wrapper">
        <div>
            <List-item  v-for="(item, index) in news" :key="index"  :item='item'/>
        </div>
    </div>
</template>

<script>
  import { mapState } from 'vuex'
  import ListItem from "@/components/ListItem.vue";
  import BScroll from 'better-scroll'
    export default {
        name:'News',
        data() {
            return {
               
            }
        },
         mounted() {
            this.$nextTick(() => {
                this.scroll = new Bscroll(this.$refs.wrapper, {})
            })
        },
        computed:{
            ...mapState(['news'])
        },
        components:{
            ListItem
        }
    }
</script>

<style scoped lang='scss'>
 .news{
     width: 80%;
     height: 100%;
     margin: auto;
 }
</style>